home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE03 / CLINIC / LISTING1.PAS next >
Encoding:
Pascal/Delphi Source File  |  1995-07-28  |  468 b   |  19 lines

  1.  procedure Hack;
  2.  var
  3.    W: array[0..$7F] of Byte;
  4.    I: Integer;
  5.  begin
  6.    for I := 0 to $7F do W[I] := I;
  7.  end;
  8.  
  9.  procedure TWinControl.DefaultHandler(var Message);
  10.  begin
  11.    if FHandle <> 0 then
  12.      with TMessage(Message) do
  13.      begin
  14.        if (Msg = WM_PAINT) and (WParam <> 0) then Hack; { <== HERE!! }
  15.        Result := CallWindowProc(FDefWndProc, FHandle, Msg, WParam, LParam);
  16.      end
  17.    else
  18.      inherited DefaultHandler(Message);
  19.  end;